<!DOCTYPE html>
<html xmlns:th="http://www.springframework.org/schema/mvc">
<head>
    <meta charset="utf-8">
    <title>菜鸟教程(runoob.com)</title>
    <form id="form" method="post">
        name2:<input name='data.id'/><br/>
        name2:<input name='data.id'/><br/>
        name3:<input name='data.id'/><br/>
    </form>
    <script th:src="@{/assets/js/jquery-1.10.2.js}">
    </script>
    <script>
        $(document).ready(function () {
            $("button").click(function () {
                $.ajax({
                    'url': 'getSubmit',
                    data: $("#form").serialize(),
                    success: function (result) {
                        console.log(result);
                    }
                })
            });
        });
    </script>
</head>
<body>

<div id="div1"><h2>使用 jQuery AJAX 修改文本内容</h2></div>
<button>获取外部内容</button>

</body>
</html>